
public class App {

	public static void main(String[] args) {
		Rectangle rectangle = new Rectangle(5, 6);
		Triangle triangle = new Triangle(8, 10);
		Square square = new Square(2);
		
		System.out.println(rectangle.area());
		System.out.println(triangle.area());
		System.out.println(square.area());
		
//		Figure figref;
//		
//		figref = rectangle;
//		System.out.println(figref.area());
//		
//		figref = triangle;
//		System.out.println(figref.area());
//		
//		figref = square;
//		System.out.println(figref.area());

	}

}
